<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>huty云记录</title>
    <link rel="stylesheet" href="/static/bootstrap.css">
</head>
<body>
<div class="container mt-3 border">
    <div class="row border" style="padding-top: 15px;padding-bottom: 15px;background-color: #d3d6d8">
        <div class="col" style="text-align: center">
            <h1>
                <span>
                <img src="/static/lz.png" alt="" style="height: 100px">
               Huty工作生活云记录
            </span>

            </h1>
        </div>
    </div>
    <div class="row mt-4">
        <div class="col" style="text-align: center">
            <h4><span>{{ week }}</span></h4>
        </div>
    </div>
    <div class="row">
        <div class="col">
            <form action="{{ url_for('upload_data') }}" method="post">
                <div class="mb-1">
                    <label for="exampleInputEmail1" class="form-label"></label>
                    <input type="text" class="form-control" name="deadline"
                           aria-describedby="emailHelp" placeholder="输入事项时间">
                </div>
                <div class="mb-1">
                    <label for="exampleInputPassword1" class="form-label"></label>
                    <input type="text" class="form-control" name="content" placeholder="输入事项内容">
                </div>
                {% for message in get_flashed_messages() %}
                    <div class="mb-1" style="text-align: right">
                        <div class="text-danger">{{ message }}</div>
                    </div>
                {% endfor %}
                <div style="text-align: right">
                    <button type="submit" class="btn btn-info">添加此事项</button>
                </div>
            </form>
        </div>
    </div>
    <div class="row">
        {% for todo in todo_list %}
            <div class="col-12 text-success mt-2" style="background-color: #eee;padding-top: 15px;
                    padding-left: 20px;font-size: 20px">
                事项时间: {{ todo.deadline }}<br>
                <hr>
                事项内容: {{ todo.content }}
                <br>
                <hr class="border border-primary border-3" style="margin-bottom: 5px">
            </div>
            <div class="col text-info" style="margin-bottom: -10px;margin-top: 10px">
                    <span><a href="{{ url_for('modify',id=todo.id) }}"
                             style="text-decoration-line: none">修改事项</a></span>
                <span style="margin-left:10px"><a href="{{ url_for('delete',id =todo.id) }}"
                                                  style="text-decoration-line: none">取消事项</a></span>
                <p style="text-align: right;margin-top:-10px;margin-right: 20px">
                    <span class="question-time" style="margin-top: 10px">上传时间:{{ todo.create_time }}</span>
                </p>

            </div>
        {% endfor %}
    </div>
</div>
<footer>
    <div style="margin-top: 10px">
        <hr class="border border-dark border-5" style="margin-bottom: 5px">
        <p style="text-align: center;margin-top: 10px">
            <span>&copy;Copyright by HSC Company</span><span style="font-style: italic"> limited </span>
            <span><span style="margin-right: 6px"></span>Produced by foxhuty in September 2022 in Chengdu,China</span>
        </p>
    </div>
</footer>
</body>
</html>
